import datetime

#获取当前日期和时间
current_datetime = datetime.datetime.now()
#print(current_datetime)
#获取当前日期
current_date = current_datetime.date()
current_date = str(current_date)
print(current_date.replace('-','_'))   #将原本的-替换为_
#获取当前时间
current_time= current_datetime.time()
# print(current_time)